package com.aerotechnic.controller;

import java.util.ArrayList;
import com.dhtmlx.planner.data.DHXCollection;
 
public class Table extends DHXCollection {
 
           	public String name;
           	public String key;
//           	public Integer persons = 5;
//           	public Boolean smoking = false;
           	public Boolean open = true;
           	public ArrayList<DHXCollection> children = null;
 
 
           	public Table(String value, String label, Boolean open) {
                          	super(value, label);
                          	setKey(value);
                          	setName(label);
                          	setOpen(open);
           	}
 
           	public String getName() {
                          	return name;
           	}
 
           	public void setName(String name) {
                          	this.name = name;
                          	render();
           	}
 
          
           	protected void render() {
                          	setLabel(this.name);
           	}
 
           	public Iterable<DHXCollection> getChildren() {
                          	return children;
           	}
           	public void setChildren(ArrayList<DHXCollection> children) {
                          	this.children = children;
           	}
           	public void addChild(DHXCollection child) {
                          	if (children == null)
                                        	children = new ArrayList<DHXCollection>();
                          	children.add(child);
           	}
 
           	public String getKey() {
                          	return key;
           	}
           	public void setKey(String key) {
                          	this.key = key;
           	}

			public Boolean getOpen() {
				return open;
			}

			public void setOpen(Boolean open) {
				this.open = open;
			}
           	
           	
           	
           }
